﻿using QLInternet.Components;
using QLInternet.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.ObjectModel;

namespace QLInternet.ViewModel
{
    class SettingTypeViewModel: ObservableObject
    {
        private SettingType settingType;

        private ObservableCollection<SettingType> listSetting;

        private int sTT;
        private string tenModem;
        private int donGia;
        public int STT
        {
            get { return sTT; }
            set { sTT = value; }
        }
        public int MaKieuCD
        {
            get { return settingType.MaKieu; }
            set
            {
                if (settingType.MaKieu != value)
                {
                    settingType.MaKieu = value;
                    NotifyPropertyChanged("MaKieuCD");
                }
            }
        }

        public int DonGia
        {
            get { return donGia; }
            set
            {
                if (donGia != value)
                {
                    donGia = value;
                    NotifyPropertyChanged("DonGia");
                }
            }
        }
        public string TenKieuCD
        {
            get { return settingType.TenKieu; }
            set
            {
                if (settingType.TenKieu != value)
                {
                    settingType.TenKieu = value;
                    NotifyPropertyChanged("TenKieuCD");
                }
            }
        }

        public string TenModem
        {
            get { return tenModem; }
            set
            {
                if (tenModem != value)
                {
                    tenModem = value;
                    NotifyPropertyChanged("TenModem");
                }
            }
        }

        public ObservableCollection<SettingType> ListSettingType
        {
            get { return listSetting; }
        }

        public SettingTypeViewModel()
        {
            settingType = new SettingType();
            listSetting=  settingType.getDSKieuCD();
        }
    }
}
